-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(popup-menu): add API to provide custom no search results entry #847
Conversation
bc6d149
to
c00fcab
Compare
45904e0
to
810f1bf
Compare
@nikku I adjusted the implementation as suggested. The search is now passed to the callback, which returns the custom node. |
c1f3aa9
to
8c33f15
Compare
🙃 How looks did out? Did you complete fine tuning this PR? |
c39750e
to
baa7391
Compare
Unfortunately, I got stuck due to failing tests on Linux & Firefox. They are extremely flaky so I replaced |
47ae206
to
ce76967
Compare
@nikku Should be ready to be reviewed now. What a pain in the 🍑 that was. |
@philippfromme As discussed I went forth and do a little bit more work on this PR:
Please checkout what I did and see if it makes sense. |
Looks good to me. @nikku I requested another review so feel free to approve and merge. |
Concatenating all searchable fields using `---` results in matching non-existing fields, e.g. `foo---bar`. test(popup-menu): add search test coverage
Ensures we call out what the things are, following our existing patterns of providers and consumers. BREAKING CHANGES: PopupMenu *Callback types renamed to *Provider.
4473f65
to
18c7bf2
Compare
Adds
getEmptyPlaceholder
API toPopupMenuProvider
to customize what's shown when there are no entries (after search). Based on the original issue is clear that a simple string or even an HTML string as it's used for icons (imgHtml
) won't cut it here which means we have to allow users to return aVNode
. The search is passed to the callback returning theVNode
so it can be taken into account.Example
Closes #846